<template>
  <div>
    <svg :style="{ width:width+'px',height: height +'px'}">
      <!-- xlink-href: 执行哪个图标 -->
      <use :href="prefix + name" :fill="color"></use>
    </svg>
  </div>
</template>
<script lang="ts" setup>
// import { defineProps } from 'vue';
defineProps({
  prefix: {
    type: String,
    default: '#icon-',
  },
  name: {
    type: String,
    default: ''
  },
  color: {
    type: String,
    default: ''
  },
  width: {
    type: String,
    default: '16'
  },
  height: {
    type: String,
    default: '16'
  }
});
</script>
<style lang="scss" scoped></style>
